package com.tianji.learning.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.tianji.common.domain.dto.PageDTO;
import com.tianji.common.domain.query.PageQuery;
import com.tianji.learning.domain.dto.LearningPlanDTO;
import com.tianji.learning.domain.po.LearningLesson;
import com.tianji.learning.domain.vo.LearningLessonVO;
import com.tianji.learning.domain.vo.LearningPlanPageVO;

import java.util.List;

/**
 * <p>
 * 学生课程表 服务类
 * </p>
 *
 * @author lyh
 * @since 2024-12-03
 */
public interface ILearningLessonService extends IService<LearningLesson> {

    void savelession(Long userId, List<Long> courseIds);

    PageDTO<LearningLessonVO> queryMyLessons(PageQuery query);

    LearningLessonVO queryMyCurrentLesson();

    /**
     * 删除失效，或者退款的课程
     * @param userId
     * @param courseIds
     */
    void deletelession(Long userId, List<Long> courseIds);

    Long isLessonValid(Long courseId);

    LearningLessonVO getByCourseIdAndUserId(Long courseId);

    Integer countLearningLessonByCourse(Long courseId);

    /**
     * 设置学习计划
     * @param dto
     */
    void lessonPlan(LearningPlanDTO dto);

    LearningPlanPageVO getMyPlan(PageQuery pageQuery);
}
